﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace _9___PositiveIntegerNumbers
{
    class Program
    {
        static void ExtractIntegers(string text)
        {
            string pattern = @"\b[^\d]+\b";
            Regex r = new Regex(pattern);

            string[] result = r.Split(text);
            foreach (var item in result)
            {
                //if(Regex.IsMatch(item, @"\A[1-9][0-9]*\Z"))
                if(item!="")
                Console.WriteLine(item);
            }
        }

        static void Main(string[] args)
        {
            string text = "jkasdh ljk54h lkhsdlfiu8y3439 342 ksdaj 343 -726 ";
            ExtractIntegers(text);
        }
    }
}
